<?php
/**
 * 售后表模型
 */

namespace app\common\model;

use think\model\concern\SoftDelete;

class UserOrderService extends Model
{
    use SoftDelete;
    public $softDelete = true;
    protected $name = 'user_order_service';
    protected $autoWriteTimestamp = true;

    //可搜索字段
    protected $searchField = [];

    //可作为条件的字段
    protected $whereField = [];

    //可做为时间
    protected $timeField = [];

    //1 差价 2 运费
    public function getOrderTextAttr($value, $data)
    {
        return self::BOOLEAN_ORDER_TEXT[$data['type']];
    }

    //1 系统 2站长
    public function getIdenTextAttr($value, $data)
    {
        return self::BOOLEAN_IDEN_TEXT[$data['source']];
    }

    //0 待处理 1 已处理
    public function getCondTextAttr($value, $data)
    {
        return self::BOOLEAN_COND_TEXT[$data['status']];
    }

    //处理时间获取器
    public function getReplyTimeAttr($value)
    {
        return date('Y-m-d H:i:s',$value);
    }

    //处理时间修改器
    public function setReplyTimeAttr($value)
    {
        return strtotime($value);
    }




}